//
//  CQTagAddCollectionViewCell.m
//  AllScrollViewDemo
//
//  Created by ciyouzen on 2016/06/07.
//  Copyright © 2016年 dvlproad. All rights reserved.
//

#import "CQTagAddCollectionViewCell.h"
#import <Masonry/Masonry.h>
#import <CJBaseUIKit/UIColor+CJHex.h>
#import "UIImage+CQTagListBundle.h"

@interface CQTagAddCollectionViewCell () {
    
}

@end


@implementation CQTagAddCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self setupViews];
    }
    return self;
}

#pragma mark - SetupViews
- (void)setupViews {
    self.backgroundColor = [UIColor whiteColor];
    self.layer.cornerRadius = 17;
    self.layer.borderWidth = 2;
    self.layer.borderColor = CJColorFromHexString(@"#0C101B").CGColor;
    
    UILabel *textLabel = [[UILabel alloc] init];
    textLabel.textAlignment = NSTextAlignmentCenter;
    textLabel.font = [UIFont fontWithName:@"PingFangSC-Semibold" size:14];
    textLabel.text = NSLocalizedString(@"自定义", nil);
    textLabel.textColor = CJColorFromHexString(@"#0C101B");
    textLabel.layer.cornerRadius = 10;
    [self.contentView addSubview:textLabel];
    [textLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.contentView).offset(6);
        make.top.equalTo(self.contentView).offset(2);
        make.centerY.equalTo(self.contentView);
    }];
    self.textLabel = textLabel;
    
    UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectZero];
    imageView.image = [UIImage taglist_image_add];
    [self.contentView addSubview:imageView];
    [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.height.equalTo(@12);
        make.right.equalTo(textLabel.mas_left).offset(-2);
        make.centerY.equalTo(self.contentView);
    }];
}


@end
